<?php
/**
* @file $HeadURL: jobcategory.php $
* @author $Author: ZhangFan $
* @date $Date: 2015-12-14 $
* @brief
*/

namespace haibao\cms\data;

class JobCategory extends \haibao\cms\data\BaseMysql{

    public function __construct(){
        parent::__construct('\haibao\cms\model\data\JobCategory');
    }
    public function changeJobCateStatusById($id,$status){
        $this->updateById($id, array(
	        \haibao\cms\model\filter\JobCategory::CONDITION_FIELD_NAME_STATUS => $status
	    ));
        if(!$status){
            $sql = "update Job set Status = '$status' where CateId = '$id'";
            $this->query($sql);
        }
    }
}